from flask import Flask, url_for, redirect
import config
from apps.cms.views import bp as bp_cms


def create_app():
    app = Flask(__name__)
    app.register_blueprint(bp_cms)
    app.config.from_object(config)
    return app


app = create_app()
@app.route('/')
def hello_world():
    return redirect(url_for('cms.index'))

@app.template_filter('listMax')
def listMax(lst):
    return max(lst)

if __name__ == '__main__':
    app = create_app()
    app.run(debug=True)
